package com.summer.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
//等价于<bean id="user" class="com.summer.pojo.User"/>

@Component
@Scope("singleton")
public class User {
    //相当于<bean id="user" class="com.summer.pojo.User">
    // <property name="name" value="夏天"/>
    // </bean>
    @Value("夏天")
    public String name;
}
